import { FC } from 'react';
import { Input } from 'antd';

import { PasswordProps } from 'antd/es/input/Password';

import FormItem, { FormItemProps } from '@/components/form-item';

const { Password } = Input;

interface PasswordItemProps extends FormItemProps {
  passwordProps?: PasswordProps;
}

const PasswordItem: FC<PasswordItemProps> = ({ passwordProps, ...restProps }) => (
  <FormItem {...restProps}>
    <Password placeholder="请输入" autoComplete="off" {...passwordProps} />
  </FormItem>
);

export default PasswordItem;
